<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI 日期选择器（Datepicker） - 默认功能</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
  <script>
  var availableDates = ["9-3-2017","20-3-2017","20-4-2017","2-4-2017","14-3-2017","15-3-2017"];
  var availablePrice = ['9','20','15','14'];

function available(date) {
  dmy = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear();
  if ($.inArray(dmy, availableDates) != -1) {
    return [true, "","Available"];
  } else {
    return [false,"","unAvailable"];
  }
}
/*
 dateFormat: "yy-mm-dd"
*/
  $(function() {
    $( "#datepicker" ).datepicker({
					//format: 'hello dd/MM/yyyy hh:mm:ss',
				 //format: "dd/mm/yyyy",
				dateFormat: "yy/dd/mm  price",
				startDate: "today",
				autoclose: true,
				beforeShowDay:available
	}).on( "click", function() {
        var dTxt = $( this ).data('dptxt');
    $('.ui-datepicker-calendar').after('<span class="middle">'+'aaaa'+'</>');
});
$("#datepicker").focus(function () {

                 $(".ui-datepicker-calendar .ui-state-default").each(function () {
						console.log($(this).html);
                     //add custome text to date cell$.inArray(3,arr) ==-1
                      if($.inArray($(this).html(),availablePrice)!=-1){$(this).html($(this).html() + "<span style='color:red;font-size:0.8em'>380<span>"); }

                 });
             });
  });
  </script>
</head>
<body>
 
<p>日期：<input type="text" id="datepicker"></p>
<p>Date1: <input type="text" class="datepicker" 
           data-dptxt="the text1 to display in datepicker" ></p>

<p>Date2: <input type="text" class="datepicker" 
           data-dptxt="the Second text to display" ></p>
 
 
</body>
</html>